<!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="UTF-8">
	<title>Document</title>
	<script>
		
		function time(date) {
			now = new Date();

			gouqing = new Date('2019-01-01 0:0:0');

			diff = Math.round((gouqing.getTime()-now.getTime())/1000);

			day = Math.floor(diff/86400);

			diff = diff%86400;

			hours = Math.floor(diff/3600);

			diff = diff%3600;

			min = Math.floor(diff/60);
			
			scends = diff%60;

			document.write(day+"天-"+hours+"小时-"+min+"分钟-"+scends+"秒");
		}

		setInterval(time,1000);




	</script>
</head>
<body>
	
</body>
</html>